 /**
 * 
 */

function getImgSrc(avatarType){
	return {
		"10":"img/cat1.png",
		"20":"img/chicken1.png",
		"30":"img/dog1.png",
		"40":"img/monkey1.png",
		"50":"img/mouse1.png",
		"60":"img/pig1.png",
		"70":"img/rabbit1.png",
		"80":"img/bomb.gif",
		"90":"img/avatar1.gif",
		"100":"img/bogun.png",
		"110":"img/omnom1.png"
	}[avatarType] || "img/avatar1.gif";
}

function getPtStatNm(ptStatCd){
	return {
		"10":"준비",
		"20":"진행",
		"25":"진행-동영상",
		"26":"진행-프레지",
		"30":"설문진행",
		"40":"설문종료",
		"50":"실습진행",
		"90":"종료"
	}[ptStatCd] || "??";
}

function getMinXById(id){
	return $("#"+id).offset().left;
}
function getMaxXById(id){
	var obj = $("#"+id);
	return obj.offset().left + obj.width();
}
function getMinYById(id){
	return $("#"+id).offset().top;
}
function getMaxYById(id){
	var obj = $("#"+id);
	return obj.offset().top + obj.height();
}

function getMinXByObject(obj){
	return obj.offset().left;
}
function getMaxXByObject(obj){
	return obj.offset().left + obj.width();
}
function getMinYByObject(obj){
	return obj.offset().top;
}
function getMaxYByObject(obj){
	return obj.offset().top + obj.height();
}

function isMobile() {
	var mobileKeywords = ["iPhone", "iPod", "BlackBerry", "Android", "Windows CE", "LG", "MOT", "SAMSUNG", "SonyEricsson", "iPad"];
	for(var i in mobileKeywords) {
		if( navigator.userAgent.match(mobileKeywords[i]) != null ) return true;
	}
	return false;
}